package org.llc.flink.explore.parameter

import org.apache.flink.streaming.api.scala._
import org.llc.flink.explore.utils.FlinkUtils

/**
 * Title: 流处理参数可配置
 * Description: 
 * Date 2021/3/3
 */
object StreamParameterDemo {
  def main(args: Array[String]): Unit = {
    // 1.env
    val sMainName = this.getClass.getSimpleName.replace("$", "")
    val flinkUtils = new FlinkUtils(args, sMainName)

    val env = flinkUtils.getStreamExecutionEnvironment()

    // 2.source
    val dataStream = env.addSource(flinkUtils.getDataSource())

    // 3.transformation
    val preProcess = dataStream

    val res = preProcess

    // 4.sink
    //    res.addSink(flinkUtils.getDataSink())
    res.print()

    // 5.execute
    env.execute(sMainName)
  }
}

